
import web
import json

class async:
	def GET(self):
		web.setcookie('web', 'python')
		return '{"url": "/api/index"}'

class index:
	def GET(self):
		cookies = web.cookies()
		return json.dumps(cookies)
		
routes = (
	'/api/async', 'async',
	'/api/index', 'index'
)

app = web.application(routes, globals(), False)
app.run()